import React, {Component} from 'react'
import {Dialog} from "primereact/dialog";
import {Button} from "primereact/button";

export default class CreateKeyDialog extends Component {

    render() {
        let footer = <div style={{textAlign: "center"}}>
            <Button style={{width: "100px"}} label="重新生成" className="p-button-success "/>
            <Button style={{width: "100px"}} onClick={() => this.props.openFunc(false)} label="取消"
                    className="p-button-warning "/>
        </div>
        return (
            <div>
                <Dialog header="生成私钥" footer={footer} visible={this.props.visible} modal={true}
                        onHide={() => this.props.openFunc(false)} width="700px">
                    <div style={{minHeight: "400px", position: "relative"}}>
                        <div className="card">
                            <div style={{display: "inline-block", width: "80%"}}>
                                <h5>公钥</h5>
                                <h5>EOS8AozdWhc...L9yCvh6TcaNFm3Vo7xZt</h5>
                            </div>
                            <div style={{display: "inline-block", width: "20%"}}>
                                <Button label="生成" style={{width: "80px"}} className="p-button-success"/>
                            </div>
                        </div>
                        <div className="card">
                            <div style={{display: "inline-block", width: "80%"}}>
                                <h5>私钥</h5>
                                <h5>EOS8AozdWhc...L9yCvh6TcaNFm3Vo7xZt</h5>
                            </div>
                            <div style={{display: "inline-block", width: "20%"}}>
                                <Button label="生成" style={{width: "80px"}} className="p-button-success"/>
                            </div>
                        </div>
                        <ul>
                            <li>请务必妥善备份公私钥</li>
                        </ul>


                    </div>
                </Dialog>
            </div>
        )
    }
}